<extend name="Layout/ins_page" />
{:W('PageHeader/adv_search',array('name'=>'绩效管理'))}
<block name="content">
	<form method="post" name="form_adv_search" id="form_adv_search">
		<div class="adv_search panel panel-default"  id="adv_search">
			<div class="panel-heading">
				<div class="row">
					<h4 class="col-xs-6">高级搜索</h4>
					<div class="col-xs-6 text-right">
						<a  class="btn btn-sm btn-info" onclick="submit_adv_search();">搜索</a>
						<a  class="btn btn-sm btn-info" href="{:U('index')}">重置</a>
					</div>
				</div>
			</div>
			<div class="panel-body">
				<div class="form-group col-sm-6">
					<label class="col-sm-4 control-label" for="eq_dept_id">部门：</label>
					<div class="col-sm-8">
						<select class="form-control" name="eq_dept_id">
							<option value="">选择部门</option>
							{$dept_list}
						</select>
					</div>
			    </div>
			    <notempty name="user_array">
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label" for="user_id">提交人：</label>
						<div class="col-sm-8">
							<select class="form-control" name="user_id" >
								<option value="">选择人员</option>
								<foreach name="user_array" item="vo">
									<option  <if condition="$vo.id eq $user_id">selected="selected"</if>  value="{$vo.id}" >{$vo.name}</option>	
								</foreach>	
							</select>
						</div>
					</div>
				</notempty>
				<div class="form-group col-sm-6">
					<label class="col-sm-4 control-label" for="be_create_time">时间：</label>
					<div class="col-sm-8">
						<div class="input-daterange input-group" >
							<input type="text" class="input-sm form-control text-center" name="be_input_date"  value="{$be_input_date}"/>
							<span class="input-group-addon">-</span>
							<input type="text" class="input-sm form-control text-center" name="en_input_date"  value="{$en_input_date}" />
						</div>
					</div>
				</div>
			</div>
		</div>
	</form>
	<div class="space-8"></div>
	<div class="ul_table ul_table_responsive">
		<ul>
			<li class="thead">
				<span class="col-15 text-center">任务</span>
				<span class="col-10 text-center">姓名</span>
				<span class="col-10 text-center">产品</span>
				<span class="col-10 text-center">数量</span>
				
				<span class="col-10 text-center">生产单价</span>
				<span class="col-10 text-center">总绩效</span>
				<span class="col-13 text-center">提交时间</span>
			</li>
			<empty name="list">
				<li class="no-data">
					没找到数据
				</li>
				<else/>
				<foreach name="list" item="vo">
					<li class="tbody data_item">
						<span class="col-15 text-center">
							<php>echo $task[$vo['task_id']]</php>
						</span>
						<span class="col-10 text-center">{$vo.user_name}</span>
						<span class="col-10 text-center">{$vo.product}</span>
						<span class="col-10 text-center">{$vo.number}</span>
						<span class="col-10 text-center">{$vo.product_price}</span>
						<span class="col-10 text-center data_1">{$vo.total_product_price}</span>
						<span class="col-13 text-center">{$vo.create_at}</span>
					</li>
				</foreach>
				<li class="tbody data_total">
					<span class="col-15 text-center">合计</span>
					<span class="col-10 text-center">&nbsp;</span>
					<span class="col-10 text-center">&nbsp;</span>
					<span class="col-10 text-center">&nbsp;</span>
					<span class="col-10 text-center">&nbsp;</span>
					<span class="col-10 text-center data_1_total">100</span>
					<span class="col-13 text-center">&nbsp;</span>
				</li>
				<div class="pagination">
					{$page}
				</div>
			</empty>
		</ul>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		$(document).ready(function() {
			total_init();
		});
		
		function total_init() {
			total = 0;
			$(".ul_table .data_1").each(function() {
				total += parseFloat($(this).text());
			});
			
			$('.data_1_total').text(total);
		}
		
	</script>
</block>